<template>
  <div>
    <tab-bar>
      <!-- 在父组件里给每个项目添加path="/home"用于传给子组件，用于路由地址跳转 -->
      <tab-bar-item path="/home">
        <img slot="item-icon" src="~assets/img/home.png" alt="" />
        <img slot="item-icon-active" src="~assets/img/home_active.png" alt="" />
        <span slot="item-text">首页</span>
      </tab-bar-item>
      <tab-bar-item path="/category">
        <img slot="item-icon" src="~assets/img/category.png" alt="" />
        <img
          slot="item-icon-active"
          src="~assets/img/category_active.png"
          alt=""
        />
        <span slot="item-text">分类</span>
      </tab-bar-item>
      <tab-bar-item path="/shopcart">
        <img slot="item-icon" src="~assets/img/shopcart.png" alt="" />
        <img
          slot="item-icon-active"
          src="~assets/img/shopcart_active.png"
          alt=""
        />
        <span slot="item-text">购物车</span>
      </tab-bar-item>
      <tab-bar-item path="/profile">
        <img slot="item-icon" src="~assets/img/profile.png" alt="" />
        <img
          slot="item-icon-active"
          src="~assets/img/profile_active.png"
          alt=""
        />
        <span slot="item-text">我的</span>
      </tab-bar-item>
    </tab-bar>
  </div>
</template>

<script>
import TabBar from "components/commom/tabbar/TabBar";
import TabBarItem from "components/commom/tabbar/TabBarItem";

export default {
  name: "MainTabBar",
  components: {
    TabBar,
    TabBarItem,
  },
};
</script>
